#define _CRT_SECURE_NO_WARNINGS 1

#include "Stack.hpp"
#include "CQueue.hpp"

void TestStack1()
{
	YX::Stack<int> st;


	st.Push(1);
	st.Push(1);
	st.Push(1);
	st.Push(1);
	st.Push(1);
	st.Push(1);

	YX::Stack<int> copy = st;

	while (!st.Empty())
	{
		std::cout << st.Top() << " "<<st.Size()<<endl;
		st.Pop();
		copy = st;
	}

	while (!copy.Empty())
	{
		std::cout << copy.Top() << " " << copy.Size() << endl;
		copy.Pop();
	}
}

void TestCQueue()
{
	YX::CQueue<int> cq(5);


	cq.Push(1);
	cq.Push(2);
	cq.Push(3);
	cq.Push(4);
	cq.Push(5);
	cq.Push(6);
	YX::CQueue<int> copy = cq;

	while (!cq.Empty())
	{
		std::cout << cq.Front() << " " << cq.Size() << endl;
		cq.Pop();
		copy = cq;
	}

	while (!copy.Empty())
	{
		std::cout << copy.Front() << " " << copy.Size() << endl;
		copy.Pop();
	}

}

int main()
{
	//TestStack1();
	TestCQueue();
	return 0;
}